#ifndef ENTITY_H
#define ENTITY_H

#include "enums.h"
#include "textdisplay.h"
#include "Vector2.h"
#include "Sprite.h"
#include "Animation.h"

class Entity
{
    public:
        /** Default constructor */
        Entity(EntityType type, string name);
        /** Default destructor */
        virtual ~Entity();
        /** Access type
         * \return The current value of type
         */
        EntityType Gettype() { return type; }
        /** Access alive
         * \return The current value of alive
         */
        bool Getalive() { return alive; }
        void Setalive(bool val) { alive = val; }
        void DisplayStats();
        int GetHealth() { return health; }
        int GetMaxHealth() { return maxHealth; }
        int GetMagicPower() { return magicPower; }
        int GetMaxMagicPower() { return maxMagicPower; }
        string GetName() { return name; }
        void SetName(string val) {name = val; }
        ActionType GetAction();
        bool ExecuteAction(ActionType action);
        void SetSprite(Sprite *pEntitySprite);
        void SetSprite(Animation *pEntityAnimation);
        void Draw(Vector2 position);
    protected:
    private:
        EntityType type;
        bool alive;
        int health;
        int maxHealth;
        int magicPower;
        int maxMagicPower;
        TextBarMeter healthBar;
        TextBarMeter magicBar;
        string name;
        SpriteType thisSpriteType;
        Animation *pThisAnimation;
        Sprite *pThisSprite;
};

#endif // ENTITY_H
